<?php

namespace app\model;

use think\model\Pivot; // 修改: 修改继承类为 Pivot

class PackageDish extends Pivot
{
  protected $table = 'package_dish';

  public function package()
  {
    return $this->belongsTo(Package::class, 'package_id');
  }

  public function dish()
  {
    return $this->belongsTo(Dish::class, 'dish_id');
  }
}
